package config

import (
	"github.com/go-redis/redis/v8"
	"gorm.io/gorm"
)

type Config struct {
	Nacos  Nacos
	ALiYun ALiYun
}
type ALiYun struct {
	AccessKeyId     string
	AccessKeySecret string
}
type Nacos struct {
	NamespaceId string
	IpAddr      string
	Port        uint64
	DataId      string
	Group       string
}
type T struct {
	Mysql struct {
		User     string `json:"user"`
		Pass     string `json:"pass"`
		Host     string `json:"host"`
		Port     int    `json:"port"`
		Database string `json:"database"`
	} `json:"mysql"`
	Redis struct {
		Addr string `json:"addr"`
		Pass string `json:"pass"`
		Db   int    `json:"db"`
	} `json:"redis"`
}

var Conf *Config
var DB *gorm.DB
var Rdb *redis.Client
